<?php

/**
 * Lectura_Citologia filter form base class.
 *
 * @package    citologia
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseLectura_CitologiaFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'usuarios_id'                  => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'), 'add_empty' => true)),
      'citologia_id'                 => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Citologia'), 'add_empty' => true)),
      'calidadmuestra'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'identificacion'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'infoclinica'                  => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'numeroepiteliales'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'numeroendocerviales'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'inadecuadaxq'                 => new sfWidgetFormFilterInput(),
      'anomaliascelulasescamosas_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Anomalias_Celulas_Escamosas'), 'add_empty' => true)),
      'evaluacionhormonal_id'        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Evaluacion_Hormonal'), 'add_empty' => true)),
      'resultadohistopatologico_id'  => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Resultado_Histopatologico'), 'add_empty' => true)),
      'observaciones'                => new sfWidgetFormFilterInput(),
      'created_at'                   => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'updated_at'                   => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
    ));

    $this->setValidators(array(
      'usuarios_id'                  => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Usuarios'), 'column' => 'id')),
      'citologia_id'                 => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Citologia'), 'column' => 'id')),
      'calidadmuestra'               => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'identificacion'               => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'infoclinica'                  => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'numeroepiteliales'            => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'numeroendocerviales'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'inadecuadaxq'                 => new sfValidatorPass(array('required' => false)),
      'anomaliascelulasescamosas_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Anomalias_Celulas_Escamosas'), 'column' => 'id')),
      'evaluacionhormonal_id'        => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Evaluacion_Hormonal'), 'column' => 'id')),
      'resultadohistopatologico_id'  => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Resultado_Histopatologico'), 'column' => 'id')),
      'observaciones'                => new sfValidatorPass(array('required' => false)),
      'created_at'                   => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'                   => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('lectura_citologia_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Lectura_Citologia';
  }

  public function getFields()
  {
    return array(
      'id'                           => 'Number',
      'usuarios_id'                  => 'ForeignKey',
      'citologia_id'                 => 'ForeignKey',
      'calidadmuestra'               => 'Number',
      'identificacion'               => 'Number',
      'infoclinica'                  => 'Number',
      'numeroepiteliales'            => 'Number',
      'numeroendocerviales'          => 'Number',
      'inadecuadaxq'                 => 'Text',
      'anomaliascelulasescamosas_id' => 'ForeignKey',
      'evaluacionhormonal_id'        => 'ForeignKey',
      'resultadohistopatologico_id'  => 'ForeignKey',
      'observaciones'                => 'Text',
      'created_at'                   => 'Date',
      'updated_at'                   => 'Date',
    );
  }
}
